jQuery("#dbm_supplier_mgr").jqGrid({
   	url:'/store/rpc?q=supplier',
	datatype: "json",
   	colNames:['編號','廠商名稱', '地址', '聯絡電話','電子郵件','註記'],
   	colModel:[
   		{name:'id',index:'__key__', width:55,editable:false,editoptions:{readonly:true,size:10}},
   		{name:'name',index:'name', width:90,editable:true,editoptions:{size:25}},
   		{name:'postal_addr',index:'postal_addr', width:90,editable:true,editoptions:{size:25}},
   		{name:'contact_phone',index:'contact_phone', width:90,editable:true,editoptions:{size:25}},
   		{name:'contact_email',index:'contact_email', width:90,editable:true,editoptions:{size:25}},
   		{name:'note',index:'note', width:100, sortable:false,editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}}		
   	],
   	rowNum:10,
   	rowList:[10,20,30],
   	imgpath: gridimgpath,
   	pager: jQuery('#dbm_supplier_mgr_page'),
   	sortname: '__key__',
    viewrecords: true,
    sortorder: "asc",
    jsonReader: {
      repeatitems : false,
      id: "0"
    },
    caption:"供應商管理",
    editurl:"/store/supplier",
	height:210
}).navGrid('#dbm_supplier_mgr_page',
{view:true, search:false}, //options
{height:280,reloadAfterSubmit:false}, // edit options
{height:280,reloadAfterSubmit:false
  , afterSubmit : function(response, postdata) {
    eval('res = ' + response.responseText);
    /* update post date, can correct fix the id issues*/
    //jQuery('#dbm_supplier_mgr').addRowData(res.id, res);
    return [true, "OK", res.id];
  }
}, // add options
{reloadAfterSubmit:false}, // del options
{} // search options
);
